const name = 'test';
const bg_url = "../image/bg1.jpg";

function getBackgroundImg(url) {
    return new Promise( (resolve, reject) =>{
        let img = new Image();
        img.src = url;
        img.onload = function(){
            console.log(img.width, img.height);
            resolve([img.width, img.height, url]);
        }
    })
}


function Output() {
    let img = new Image();
    img.src = bg_url;
    img.onload = function(){
        console.log(img.width, img.height);
        return img.width;
    }
}

function setBg (){
    console.log(name);
}

function getWindowSize() {
    let w = window.document.documentElement.clientWidth;
    let h = window.document.documentElement.clientHeight;
    return [w, h]
}

export default {
    setBg,
    getWindowSize,
    Output
}